package pers.cj.pdos.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 因为商品序列号是分表设计的，每个商品id会生成一个表名，所以此表是记录已存在序列号的表明
 * </p>
 *
 * @author chenj
 * @since 2020-01-07
 */
public class SnTableName extends Model<SnTableName> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 商品id
     */
    private String goodsId;

    /**
     * 每个商品对应的sn号的表名
     */
    private String tableName;

    /**
     * 所属公司Id
     */
    private String companyId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SnTableName{" +
            "id=" + id +
            ", goodsId=" + goodsId +
            ", tableName=" + tableName +
            ", companyId=" + companyId +
        "}";
    }
}
